﻿using System;
using System.IO;
using System.Collections.Generic;

namespace InfrastructureNamespace
{
    public class LogHtmlWriter
    {
        public void Write(Log log, TextWriter writer)
        {
            writer.WriteLine("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body><table>");
            foreach (var item in log.Items)
            {
                writer.WriteLine(
                    string.Format("<tr><td>{0}</td></tr>", item));
            }
            writer.WriteLine("</table></body></html>");
        }
    }
}